home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / Commander Sets / 4D Speech Pack / 4D Speech Pack.rsrc / TEXT_19753_†SP Voice String.txt < prev    next >
Encoding:
Text File  |  1994-09-14  |  2.1 KB  |  41 lines

  1. SP Voice String (reference; line) -> err
  2.  
  3. reference   integer       specifys the channel you want to close. Use the
  4.                                     reference number obtained from the
  5.                                    SP Open Voice function.
  6. line            string (255) is a string (max. length 255) which contains the
  7.                                    text you want to be spoken. It can also contain a
  8.                                     reference to a "STR#‚Äú resource.
  9. err             integer       returns the error which occured. 
  10.                                     A value of zero indicates no error occured. See 
  11.                                     below for a list of possible errors.
  12.  
  13. Speaks the string you pass using the voice of the open speech channel you specify.
  14.  
  15. The line you pass is copied and this copy is used to speak. You then can do whatever you want, including unload/cancel any record or clearing the variable or field after calling this function. The text stays in memory after speaking is finished, until another call is made to one of the functions in this ‚ÄùSpeech Channels‚Äú group, regardless of the speech channel reference you pass.
  16. If the specified speech channel is already speaking text, this will be stopped immediatly.
  17.  
  18. Examples:
  19.   $err := SP Voice String ($speechref;"Macintosh")
  20.   $err := SP Voice String ($speechref;"Look who is talking!")
  21.   $err := SP Voice String ($speechref;"Ren√©")
  22.   $err := SP Voice String ($speechref;":-16395,7")
  23.   $err := SP Voice String ($speechref;$line)
  24.   $err := SP Voice String ($speechref;[File 1]Name)
  25.  
  26. Possible errors:
  27.         0  No Error
  28.       -4  Speech Pack can not be used (Speech Mgr not available)
  29.   -108  Not enough memory to load voice into memory    
  30.   -111  Tried to dispose an already disposed non-relocatable block
  31.   -192  String resource not found or empty
  32.   -205  Bad channel, speaker volume is too low or Speech Pack disabled
  33.   -231  Feature not implemented on synthesizer
  34.   -242  Voice synthesizer is not ready
  35.   -247  Input text bad
  36. -3000  Invalid SpeechChannel parameter, probably invalid reference
  37.             number
  38.  
  39.  
  40.  
  41.